package com.lyc.common.config;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;

/**
 * @Author 李大神仙
 * @Date 2024/3/2 14:47
 * @Version 1.0
 */
@Configuration
@MapperScan("com.sunwoda.ms.mapper.*")//扫描mapper接口
@EnableTransactionManagement
public class MybatusPlusConfig {

   /* @Bean
    public MybatusPlusInterceptor mybatusPlusInterceptor(){
        MybatusPlusInterceptor interceptor = new MybatusPlusInterceptor();
        //interceptor.addInnerInterceptor(new MybatusPlusInterceptor());
        //分页要在权限后面
        PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
        //数据库类型,在这里使用的是postgresql
        paginationInnerInterceptor.setDbType(DbType.POSTGRE_SQL);
        //溢出总页数后是否进行处理
        paginationInnerInterceptor.setOverflow(true);
        //interceptor.addInnerInterceptor(paginationInnerInterceptor);
        return interceptor;
    }*/
}
